#ifndef COMPETITIONMODEL_H
#define COMPETITIONMODEL_H

#include <QSqlTableModel>
#include "systemcontroller.h"

class CompetitionModel : public QSqlTableModel
{
public:
    CompetitionModel(SystemController *controller, QObject * parent = 0, QSqlDatabase db = QSqlDatabase());
    ~CompetitionModel();

    //Public Static const
    static const int ID_COLUMN = 0;
    static const int NAME_COLUMN = 1;
    static const int CITY_COLUMN = 2;
    static const int DATE_COLUMN = 3;
    static const int CONTACT_MAIL_COLUMN = 4;
    static const int CONTACT_WEB_COLUMN = 5;


protected:
    QString selectStatement() const;

private:
    SystemController *systemController;

};

#endif // COMPETITIONMODEL_H
